#define SIZE_OF_Block 1024
#define MAX_NO_OF_FD 1024
#define Max_Free_Blocks 1024
int Total_No_Of_Blocks;
char error[100];
struct file_descriptor {
int used_flag;
char file_name[50];
char location_path[50];//change the location path size
char path[50];//change the absolute location path
char file_type;//change
int file_descriptor_no;//NEWLY ADDED
int parent_file_descriptor_no;//NEWLY ADDED
long int file_size;
int location_block_number;
int block_numbers[50];
};
struct MainHeader
{
 char FILE_SYSTEM_LABEL[30];//file label
int size;
int MAX_FILE_DESCRIPTORS;//max number of file descriptors
int used_File_Descriptors;//number of used file descriptors
struct file_descriptor fd [MAX_NO_OF_FD];//Max number of file descriptors
//struct free_list;//decalration of free list which gives an insight into how manuch memory is still free
int free_blocks[Max_Free_Blocks];

}header;

//These are the global variables and structure definitions


struct block {
int block_number;
char fixed_size_buffer[SIZE_OF_Block];//change --- definition of a block
};

struct Node{
	int file_descriptor_no;
	struct Node *child  ;
	struct Node *sibling ;
}*vfs;
void traverse(struct Node* node);
int removeNode(int file_descriptor_no);
void removeTraverse(struct Node* node);
char * list(char *path,int flag,char *dest_path);
void addNode(int);
char * create_file_system(char *label,int size);
char *  mount(char *label);
struct Node* searchNode(int file_descriptor_no);
char * create_rec_dir(char *path,char *dir_name);
char * create(char * path,char * file_name,char *data);
char * list_File(char *path,char * dest_file_path,char mode);
char * removedir(char * path,char);
char * move_dir(char * oldpath,char * newpath,char);
char * unmount(char *);
void moveNode(int src_file_descriptor_no, int dest_file_descriptor_no);
char * update_file_contents(char *path,char * data_file_path);
char * copy(char *src_path,char *dest_path);
char * movefile(char *srcfilepath,char *destfilepath);
void reHash(int fdnum);
